package org.jeecg.modules.zhima.portal.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.zhima.admin.entity.ZmGameRule;
import org.jeecg.modules.zhima.admin.service.IZmGameRuleService;
import org.jeecg.modules.zhima.portal.service.IGameRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GameRuleServiceImpl implements IGameRuleService {

    @Autowired
    private IZmGameRuleService zmGameRuleService;

    @Override
    public ZmGameRule getByCode(String code) {
        return zmGameRuleService.getOne(new LambdaQueryWrapper<ZmGameRule>().eq(ZmGameRule::getCode, code).eq(ZmGameRule::getStatus, 1));
    }
}
